<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>12.固定定位使用场景操作</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }


     header {
      position: fixed;
      height: 60px;
      left: 0px;
      right: 0px;
      top: 0px;
      border-bottom: solid 5px blueviolet;
      box-shadow: 0 5px 10 px #333;
      background: white;
      z-index: 9999;
    }

    main {
      position: relative;
      height: 3000px;
      margin-top: 100px;
      background: red;
    }
  </style>
</head>

<body>
    <header></header>

  <main>

  </main>
</body>

</html>